package com.stu.demo0519.demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 姚东名
 * Date: 2024-05-19
 * Time: 22:18
 */
public class Cat extends Animal{
    //1.静态代码块
    static {
        System.out.println("static :: Cat{ }");
    }
    //2.实例代码块：
    {
        System.out.println("实例代码块 Cat{ }");
    }
    //构造方法：
    public Cat(String name, int age) {
        super(name, age);//先对父类的成员进行初始化
        System.out.println("Cat()……");
    }
    public void mimi() {
        System.out.println(this.name+" 正在咪咪……");
    }
}
